<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>05【实操篇-文件目录类命令】 | Bin</title>
    <meta name="description" content="帝彬">
    <link rel="stylesheet" href="/assets/style.9f8bf5c4.css">
    <link rel="modulepreload" href="/assets/app.82d46cfc.js">
    <link rel="modulepreload" href="/assets/linux_05.md.cfe63746.lean.js">
    <link rel="prefetch" href="/assets/chunks/VPAlgoliaSearchBox.6ebb7441.js">
    <link rel="icon" href="/logo.svg">
  <link rel="preload" href="/assets/inter-latin.7b37fe23.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  <script>(()=>{const e=localStorage.getItem("vue-theme-appearance");(!e||e==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
  <meta name="generator" content="qq1974892005">
  <link rel="icon" href="/images/logo.svg">
  <meta name="name" content="Bin">
  <script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js"></script>
  <script src="https://hm.baidu.com/hm.js?d186385b8ee12dbef7031da2e9c9eee3"></script>
  <script src="/public/tinymce/tinymce.js"></script>
  <meta name="twitter:title" content="05【实操篇-文件目录类命令】 | Bin">
  <meta property="og:title" content="05【实操篇-文件目录类命令】 | Bin">
  </head>
  <body>
    <div id="app"><div class="VPApp" data-v-23306c50><!--[--><span tabindex="-1" data-v-3785d3a7></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-3785d3a7> Skip to content </a><!--]--><!----><!--[--><div></div><!--]--><header class="VPNav nav-bar stick" data-v-23306c50 data-v-7d674ffc><div class="VPNavBar" data-v-7d674ffc data-v-96a69ce8><div class="container" data-v-96a69ce8><a class="VPNavBarTitle" href="/" data-v-96a69ce8 data-v-1f5e00a8><!--[--><img class="logo" src="/logo.svg" alt="bin" srcset="" data-v-1f5e00a8><span class="text" data-v-1f5e00a8>Bin</span><!--]--></a><div class="content" data-v-96a69ce8><!----><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-96a69ce8 data-v-9072bcde><span id="main-nav-aria-label" class="visually-hidden" data-v-9072bcde>Main Navigation</span><!--[--><!--[--><a class="vt-link link VPNavBarMenuLink" href="/yuanshen/" data-v-9072bcde data-v-6bdae1a3><!--[-->原神大地图<!--]--><!----></a><!--]--><!--[--><div class="vt-flyout VPNavBarMenuGroup" data-v-9072bcde data-v-42573883><button type="button" class="vt-flyout-button" aria-haspopup="true" aria-expanded="false"><span class="vt-flyout-button-text">前端 <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-flyout-button-text-icon"><path d="M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"></path></svg></span></button><div class="vt-flyout-menu"><div class="vt-menu"><div class="vt-menu-items"><!--[--><!--[--><a class="vt-link link vt-menu-link" href="/js/01.html"><!--[-->JavaScript<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/ajax/01.html"><!--[-->ajax<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/ES6/01.html"><!--[-->ES6<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/echarts/01.html"><!--[-->echarts<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/typescript/01.html"><!--[-->typescript<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/vue2/01.html"><!--[-->vue2<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/vue3/01.html"><!--[-->vue3<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/git/01.html"><!--[-->git<!--]--><!----></a><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--[--><div class="vt-flyout VPNavBarMenuGroup" data-v-9072bcde data-v-42573883><button type="button" class="vt-flyout-button" aria-haspopup="true" aria-expanded="false"><span class="vt-flyout-button-text">服务端 <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-flyout-button-text-icon"><path d="M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"></path></svg></span></button><div class="vt-flyout-menu"><div class="vt-menu"><div class="vt-menu-items"><!--[--><!--[--><a class="vt-link link vt-menu-link" href="/nodejs/01.html"><!--[-->nodejs<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/mysql/01.html"><!--[-->mysql<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/mongodb/01.html"><!--[-->mongodb<!--]--><!----></a><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--[--><div class="vt-flyout VPNavBarMenuGroup" data-v-9072bcde data-v-42573883><button type="button" class="vt-flyout-button" aria-haspopup="true" aria-expanded="false"><span class="vt-flyout-button-text">CSS提升 <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-flyout-button-text-icon"><path d="M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"></path></svg></span></button><div class="vt-flyout-menu"><div class="vt-menu"><div class="vt-menu-items"><!--[--><!--[--><a class="vt-link link vt-menu-link" href="/less/01.html"><!--[-->less<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/sass/01.html"><!--[-->sass<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/tailwindcss/01.html"><!--[-->tailwindcss<!--]--><!----></a><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--[--><div class="vt-flyout VPNavBarMenuGroup" data-v-9072bcde data-v-42573883><button type="button" class="vt-flyout-button" aria-haspopup="true" aria-expanded="false"><span class="vt-flyout-button-text">集合 <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-flyout-button-text-icon"><path d="M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"></path></svg></span></button><div class="vt-flyout-menu"><div class="vt-menu"><div class="vt-menu-items"><!--[--><!--[--><a class="vt-link link vt-menu-link" href="/jihe/React/"><!--[-->React<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/jihe/ReactNative/"><!--[-->ReactNative<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/jihe/vue/"><!--[-->Vue<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/jihe/vuex/"><!--[-->Vuex<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/jihe/vuerouter/"><!--[-->Vue-Router<!--]--><!----></a><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--[--><div class="vt-flyout VPNavBarMenuGroup" data-v-9072bcde data-v-42573883><button type="button" class="vt-flyout-button" aria-haspopup="true" aria-expanded="false"><span class="vt-flyout-button-text">参数 <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-flyout-button-text-icon"><path d="M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"></path></svg></span></button><div class="vt-flyout-menu"><div class="vt-menu"><div class="vt-menu-items"><!--[--><!--[--><a class="vt-link link vt-menu-link" href="/about/canshu.html"><!--[-->常用参数<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/about/dayin.html"><!--[-->打印机<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/about/chahuo.html"><!--[-->市场查货<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="https://sunlogin.oray.com/download" target="_blank" rel="noopener noreferrer"><!--[-->向日葵远程下载<!--]--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" height="24px" viewbox="0 0 24 24" width="24px" class="vt-link-icon"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z"></path></svg></a><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--[--><div class="vt-flyout VPNavBarMenuGroup" data-v-9072bcde data-v-42573883><button type="button" class="vt-flyout-button" aria-haspopup="true" aria-expanded="false"><span class="vt-flyout-button-text">其他 <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-flyout-button-text-icon"><path d="M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"></path></svg></span></button><div class="vt-flyout-menu"><div class="vt-menu"><div class="vt-menu-items"><!--[--><!--[--><a class="vt-link link vt-menu-link" href="/test/"><!--[-->日志<!--]--><!----></a><!--]--><!--[--><a class="vt-link link vt-menu-link" href="/test/muban.html"><!--[-->富文本模板<!--]--><!----></a><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--]--></nav><div class="VPNavBarAppearance appearance" data-v-96a69ce8 data-v-d5f66188><button class="vt-switch vt-switch-appearance" type="button" role="switch" aria-label="toggle dark mode" data-v-d5f66188><span class="vt-switch-check"><span class="vt-switch-icon"><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-switch-appearance-sun"><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path><path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path><path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path><path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path><path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-switch-appearance-moon"><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg><!--]--></span></span></button></div><div class="vt-social-links VPNavBarSocialLinks social-links" data-v-96a69ce8 data-v-8b9a7f88><!--[--><a class="vt-social-link is-small" href="/translations/" title="languages" rel="noopener noreferrer"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-social-link-icon"><path d="M0 0h24v24H0z" fill="none"></path><path d=" M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z " class="css-c4d79v"></path></svg><span class="visually-hidden">languages</span></a><a class="vt-social-link is-small" href="https://work.weixin.qq.com/kfid/kfc8e47e8eca8390e16" title="github" target="_blank" rel="noopener noreferrer"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-social-link-icon"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path></svg><span class="visually-hidden">github</span></a><a class="vt-social-link is-small" href="mailto:dibinkf@vip.qq.com" title="slack" target="_blank" rel="noopener noreferrer"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-social-link-icon"><path d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"></path></svg><span class="visually-hidden">slack</span></a><a class="vt-social-link is-small" href="tencent://message/?uin=1974892005" title="discord" target="_blank" rel="noopener noreferrer"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-social-link-icon"><path d="M20.222 0c1.406 0 2.54 1.137 2.607 2.475V24l-2.677-2.273-1.47-1.338-1.604-1.398.67 2.205H3.71c-1.402 0-2.54-1.065-2.54-2.476V2.48C1.17 1.142 2.31.003 3.715.003h16.5L20.222 0zm-6.118 5.683h-.03l-.202.2c2.073.6 3.076 1.537 3.076 1.537-1.336-.668-2.54-1.002-3.744-1.137-.87-.135-1.74-.064-2.475 0h-.2c-.47 0-1.47.2-2.81.735-.467.203-.735.336-.735.336s1.002-1.002 3.21-1.537l-.135-.135s-1.672-.064-3.477 1.27c0 0-1.805 3.144-1.805 7.02 0 0 1 1.74 3.743 1.806 0 0 .4-.533.805-1.002-1.54-.468-2.14-1.404-2.14-1.404s.134.066.335.2h.06c.03 0 .044.015.06.03v.006c.016.016.03.03.06.03.33.136.66.27.93.4.466.202 1.065.403 1.8.536.93.135 1.996.2 3.21 0 .6-.135 1.2-.267 1.8-.535.39-.2.87-.4 1.397-.737 0 0-.6.936-2.205 1.404.33.466.795 1 .795 1 2.744-.06 3.81-1.8 3.87-1.726 0-3.87-1.815-7.02-1.815-7.02-1.635-1.214-3.165-1.26-3.435-1.26l.056-.02zm.168 4.413c.703 0 1.27.6 1.27 1.335 0 .74-.57 1.34-1.27 1.34-.7 0-1.27-.6-1.27-1.334.002-.74.573-1.338 1.27-1.338zm-4.543 0c.7 0 1.266.6 1.266 1.335 0 .74-.57 1.34-1.27 1.34-.7 0-1.27-.6-1.27-1.334 0-.74.57-1.338 1.27-1.338z"></path></svg><span class="visually-hidden">discord</span></a><!--]--></div><div class="vt-flyout VPNavBarExtra extra" data-v-96a69ce8 data-v-b3e218c4><button type="button" class="vt-flyout-button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-flyout-button-icon"><circle cx="12" cy="12" r="2"></circle><circle cx="19" cy="12" r="2"></circle><circle cx="5" cy="12" r="2"></circle></svg></button><div class="vt-flyout-menu"><div class="vt-menu"><!----><!--[--><!--[--><div class="vt-menu-group" data-v-b3e218c4><div class="vt-menu-item item" data-v-b3e218c4><p class="vt-menu-label" data-v-b3e218c4>Appearance</p><div class="vt-menu-action action" data-v-b3e218c4><button class="vt-switch vt-switch-appearance" type="button" role="switch" aria-label="toggle dark mode" data-v-b3e218c4><span class="vt-switch-check"><span class="vt-switch-icon"><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-switch-appearance-sun"><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path><path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path><path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path><path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path><path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-switch-appearance-moon"><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg><!--]--></span></span></button></div></div></div><div class="vt-menu-group" data-v-b3e218c4><div class="vt-menu-item item" data-v-b3e218c4><div class="vt-social-links social-links" data-v-b3e218c4><!--[--><a class="vt-social-link is-small" href="/translations/" title="languages" rel="noopener noreferrer"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-social-link-icon"><path d="M0 0h24v24H0z" fill="none"></path><path d=" M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z " class="css-c4d79v"></path></svg><span class="visually-hidden">languages</span></a><a class="vt-social-link is-small" href="https://work.weixin.qq.com/kfid/kfc8e47e8eca8390e16" title="github" target="_blank" rel="noopener noreferrer"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-social-link-icon"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path></svg><span class="visually-hidden">github</span></a><a class="vt-social-link is-small" href="mailto:dibinkf@vip.qq.com" title="slack" target="_blank" rel="noopener noreferrer"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-social-link-icon"><path d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"></path></svg><span class="visually-hidden">slack</span></a><a class="vt-social-link is-small" href="tencent://message/?uin=1974892005" title="discord" target="_blank" rel="noopener noreferrer"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="vt-social-link-icon"><path d="M20.222 0c1.406 0 2.54 1.137 2.607 2.475V24l-2.677-2.273-1.47-1.338-1.604-1.398.67 2.205H3.71c-1.402 0-2.54-1.065-2.54-2.476V2.48C1.17 1.142 2.31.003 3.715.003h16.5L20.222 0zm-6.118 5.683h-.03l-.202.2c2.073.6 3.076 1.537 3.076 1.537-1.336-.668-2.54-1.002-3.744-1.137-.87-.135-1.74-.064-2.475 0h-.2c-.47 0-1.47.2-2.81.735-.467.203-.735.336-.735.336s1.002-1.002 3.21-1.537l-.135-.135s-1.672-.064-3.477 1.27c0 0-1.805 3.144-1.805 7.02 0 0 1 1.74 3.743 1.806 0 0 .4-.533.805-1.002-1.54-.468-2.14-1.404-2.14-1.404s.134.066.335.2h.06c.03 0 .044.015.06.03v.006c.016.016.03.03.06.03.33.136.66.27.93.4.466.202 1.065.403 1.8.536.93.135 1.996.2 3.21 0 .6-.135 1.2-.267 1.8-.535.39-.2.87-.4 1.397-.737 0 0-.6.936-2.205 1.404.33.466.795 1 .795 1 2.744-.06 3.81-1.8 3.87-1.726 0-3.87-1.815-7.02-1.815-7.02-1.635-1.214-3.165-1.26-3.435-1.26l.056-.02zm.168 4.413c.703 0 1.27.6 1.27 1.335 0 .74-.57 1.34-1.27 1.34-.7 0-1.27-.6-1.27-1.334.002-.74.573-1.338 1.27-1.338zm-4.543 0c.7 0 1.266.6 1.266 1.335 0 .74-.57 1.34-1.27 1.34-.7 0-1.27-.6-1.27-1.334 0-.74.57-1.338 1.27-1.338z"></path></svg><span class="visually-hidden">discord</span></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><button type="button" class="vt-hamburger VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-96a69ce8 data-v-c78f86de><span class="vt-hamburger-container"><span class="vt-hamburger-top"></span><span class="vt-hamburger-middle"></span><span class="vt-hamburger-bottom"></span></span></button></div></div></div><!----></header><!----><!----><div id="VPContent" class="VPContent" data-v-23306c50 data-v-790151bc><div class="VPContentDoc has-aside" data-v-790151bc data-v-4fe9b7bd><div class="container" data-v-4fe9b7bd><div class="aside" data-v-4fe9b7bd><div class="aside-container" data-v-4fe9b7bd><!--[--><!--]--><div class="VPContentDocOutline" data-v-4fe9b7bd data-v-aa0e2252><div class="outline-marker" data-v-aa0e2252></div><div class="outline-title" data-v-aa0e2252>On this page</div><nav aria-labelledby="doc-outline-aria-label" data-v-aa0e2252><span id="doc-outline-aria-label" class="visually-hidden" data-v-aa0e2252>Table of Contents for current page</span><ul class="root" data-v-aa0e2252><!--[--><li style="" data-v-aa0e2252><a class="outline-link" href="#_1-pwd-显示当前工作目录的绝对路径" data-v-aa0e2252>1.pwd 显示当前工作目录的绝对路径</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_2-ls-列出目录的内容" data-v-aa0e2252>2.ls 列出目录的内容</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_3-cd-切换目录" data-v-aa0e2252>3.cd 切换目录</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_4-mkdir-创建一个新的目录" data-v-aa0e2252>4.mkdir 创建一个新的目录</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_5-rmdir-删除空的目录" data-v-aa0e2252>5.rmdir 删除空的目录</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_6-touch-创建空文件" data-v-aa0e2252>6.touch 创建空文件</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_7-cp-复制文件或目录" data-v-aa0e2252>7.cp 复制文件或目录</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_8-rm-删除文件或目录" data-v-aa0e2252>8.rm 删除文件或目录</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_9-mv-移动文件与目录或重命名" data-v-aa0e2252>9.mv 移动文件与目录或重命名</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_10-cat-查看文件内容" data-v-aa0e2252>10.cat 查看文件内容</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_11-less-分屏显示文件内容" data-v-aa0e2252>11.less 分屏显示文件内容</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_12-echo-输出内容到控制台" data-v-aa0e2252>12.echo 输出内容到控制台</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_13-head-显示文件头部内容" data-v-aa0e2252>13.head 显示文件头部内容</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_14-tail-输出文件尾部内容" data-v-aa0e2252>14.tail 输出文件尾部内容</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_15-输出重定向和-追加" data-v-aa0e2252>15.&gt; 输出重定向和 &gt;&gt; 追加</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_16-history-查看已经执行过历史命令" data-v-aa0e2252>16.history 查看已经执行过历史命令</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_17-ln软链接" data-v-aa0e2252>17.ln软链接</a><!----></li><li style="" data-v-aa0e2252><a class="outline-link" href="#_18-总结" data-v-aa0e2252>18.总结</a><!----></li><!--]--></ul></nav></div><!--[--><!--[--><!--[--><div><a class="sponsors-aside-text" href="/">联系客服</a><img src="/images/qrcode.png"></div><!--]--><!--]--><!--]--><div class="VPCarbonAds" data-v-4fe9b7bd><img src="/logo.svg" alt="" srcset=""></div><!--[--><!--[--><!--[--><h1 class="tagline" data-v-3916b2f0><span class="accent" data-v-3916b2f0>Bin</span><br data-v-3916b2f0>QQ - 1974892005 </h1><!--]--><!--]--><!--]--></div></div><div class="content" data-v-4fe9b7bd><!--[--><!--]--><main data-v-4fe9b7bd><div style="position:relative;" class="vt-doc linux" data-v-4fe9b7bd><div><h1 id="_05【实操篇-文件目录类命令】" tabindex="-1">05【实操篇-文件目录类命令】 <a class="header-anchor" href="#_05【实操篇-文件目录类命令】" aria-hidden="true">#</a></h1><h2 id="_1-pwd-显示当前工作目录的绝对路径" tabindex="-1">1.pwd 显示当前工作目录的绝对路径 <a class="header-anchor" href="#_1-pwd-显示当前工作目录的绝对路径" aria-hidden="true">#</a></h2><blockquote><p>pwd:print working directory 打印工作目录</p></blockquote><p>到现在为止，我们还不知道自己在系统的什么地方。在浏览器上，我们能够通过导航栏上的url，了解到自己在互联网上的具体坐标。相似的功能，是由<code>pwd</code>命令提供的，它能够输出当前的工作目录。</p><p><code>pwd</code>命令是非常非常常用的命令，尤其是在一些<code>命令提示符</code>设置不太友好的机器上。另外，它也经常用在shell脚本中，用来判断当前的运行目录是否符合需求。</p><p>有很多线上事故，都是由于没有确认当前目录所引起的。比如<code>rm -rf *</code>这种危险的命令。在执行一些高危命令时，随时确认当前目录，是个好的习惯。</p><div class="language-"><pre><code>[root@www ~]# pwd [-P]
</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>选项与参数：</p><ul><li><strong>-P</strong> ：显示出确实的路径，而非使用链接 (link) 路径。</li></ul><p>实例：单纯显示出目前的工作目录：</p><div class="language-"><pre><code>[root@www ~]# pwd
/root   &lt;== 显示出目录啦～
</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><blockquote><p>我们使用root用户默认登陆后，就停留在<code>/root</code>目录中。Linux中的目录层次，是通过<code>/</code>进行划分的。</p></blockquote><p>实例显示出实际的工作目录，而非链接档本身的目录名而已。</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># cd /var/mail   &lt;==注意，/var/mail是一个链接档</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www mail</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># pwd</span></span>
<span class="line"><span style="color:#A6ACCD;">/var/mail         </span><span style="color:#89DDFF;">&lt;</span><span style="color:#A6ACCD;">==列出目前的工作目录</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www mail</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># pwd -P</span></span>
<span class="line"><span style="color:#A6ACCD;">/var/spool/mail   </span><span style="color:#89DDFF;">&lt;</span><span style="color:#A6ACCD;">==怎么回事？有没有加 -P 差很多～</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www mail</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># ls -ld /var/mail</span></span>
<span class="line"><span style="color:#A6ACCD;">lrwxrwxrwx 1 root root 10 Sep  4 17:54 /var/mail -</span><span style="color:#89DDFF;">&gt;</span><span style="color:#A6ACCD;"> spool/mail</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;"># 看到这里应该知道为啥了吧？因为 /var/mail 是链接档，链接到 /var/spool/mail </span></span>
<span class="line"><span style="color:#676E95;font-style:italic;"># 所以，加上 pwd -P 的选项后，会不以链接档的数据显示，而是显示正确的完整路径啊！</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br></div></div><h2 id="_2-ls-列出目录的内容" tabindex="-1"><a href="http://2.ls" target="_blank" rel="noopener noreferrer">2.ls</a> 列出目录的内容 <a class="header-anchor" href="#_2-ls-列出目录的内容" aria-hidden="true">#</a></h2><blockquote><p>ls:list 列出目录内容</p></blockquote><p><code>ls</code>命令，能够列出相关目录的文件信息。可以被评为linux下最勤劳的命令标兵。</p><p>语法：</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># ls [-aAdfFhilnrRSt] 目录名称</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># ls [--color={never,auto,always}] 目录名称</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># ls [--full-time] 目录名称</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><p>选项与参数：</p><ul><li>-a ：全部的文件，连同隐藏文件( 开头为 . 的文件) 一起列出来(常用)</li><li>-d ：仅列出目录本身，而不是列出目录内的文件数据(常用)</li><li>-l ：长数据串列出，包含文件的属性与权限等等数据；(常用)</li></ul><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost /</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># ls /</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;"># 注意：ls可以接受路径参数，你不用先跳转，就可以输出相关信息</span></span>
<span class="line"><span style="color:#A6ACCD;">bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost /</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># ls -l /</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;"># 带上 -l参数，能够看到文件的一些权限信息已经更新日期等。</span></span>
<span class="line"><span style="color:#A6ACCD;">total 20</span></span>
<span class="line"><span style="color:#A6ACCD;">lrwxrwxrwx.   1 root root    7 Nov  3 20:24 bin -</span><span style="color:#89DDFF;">&gt;</span><span style="color:#A6ACCD;"> usr/bin</span></span>
<span class="line"><span style="color:#A6ACCD;">dr-xr-xr-x.   5 root root 4096 Nov  3 20:34 boot</span></span>
<span class="line"><span style="color:#A6ACCD;">drwxr-xr-x.  19 root root 3080 Nov  3 21:19 dev</span></span>
<span class="line"><span style="color:#A6ACCD;">drwxr-xr-x.  74 root root 8192 Nov  3 20:34 etc</span></span>
<span class="line"><span style="color:#A6ACCD;">drwxr-xr-x.   2 root root    6 Apr 11  2018 home</span></span>
<span class="line"><span style="color:#A6ACCD;">lrwxrwxrwx.   1 root root    7 Nov  3 20:24 lib -</span><span style="color:#89DDFF;">&gt;</span><span style="color:#A6ACCD;"> usr/lib</span></span>
<span class="line"><span style="color:#A6ACCD;">lrwxrwxrwx.   1 root root    9 Nov  3 20:24 lib64 -</span><span style="color:#89DDFF;">&gt;</span><span style="color:#A6ACCD;"> usr/lib64</span></span>
<span class="line"><span style="color:#A6ACCD;">drwxr-xr-x.   2 root root    6 Apr 11  2018 media</span></span>
<span class="line"><span style="color:#A6ACCD;">drwxr-xr-x.   2 root root    6 Apr 11  2018 mnt</span></span>
<span class="line"><span style="color:#A6ACCD;">drwxr-xr-x.   2 root root    6 Apr 11  2018 opt</span></span>
<span class="line"><span style="color:#A6ACCD;">dr-xr-xr-x. 108 root root    0 Nov  3 21:19 proc</span></span>
<span class="line"><span style="color:#A6ACCD;">dr-xr-x---.   2 root root  135 Nov  4 07:53 root</span></span>
<span class="line"><span style="color:#A6ACCD;">drwxr-xr-x.  24 root root  740 Nov  3 21:20 run</span></span>
<span class="line"><span style="color:#A6ACCD;">lrwxrwxrwx.   1 root root    8 Nov  3 20:24 sbin -</span><span style="color:#89DDFF;">&gt;</span><span style="color:#A6ACCD;"> usr/sbin</span></span>
<span class="line"><span style="color:#A6ACCD;">drwxr-xr-x.   2 root root    6 Apr 11  2018 srv</span></span>
<span class="line"><span style="color:#A6ACCD;">dr-xr-xr-x.  13 root root    0 Nov  3 21:19 sys</span></span>
<span class="line"><span style="color:#A6ACCD;">drwxrwxrwt.   9 root root 4096 Nov  4 03:40 tmp</span></span>
<span class="line"><span style="color:#A6ACCD;">drwxr-xr-x.  13 root root  155 Nov  3 20:24 usr</span></span>
<span class="line"><span style="color:#A6ACCD;">drwxr-xr-x.  19 root root  267 Nov  3 20:34 var</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br></div></div><blockquote><p>每行列出的信息依次是： 文件类型与权限 链接数 文件属主 文件属组 文件大小用byte 来表示 建立或最近修改的时间 名字</p><p><img src="https://i0.hdslb.com/bfs/album/0b901b1573479aada8d856c091084281de5c1b7b.png" alt=""></p></blockquote><p>直接在你的/root目录里，执行<code>ls -al</code>，你会看到更多东西。这些额外的隐藏文件，都是以<code>.</code>开头，以配置文件居多。这就是参数<code>a</code>的作用。</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># ls -al</span></span>
<span class="line"><span style="color:#A6ACCD;">total 28</span></span>
<span class="line"><span style="color:#A6ACCD;">dr-xr-x---.  2 root root  135 Nov  4 07:53 </span><span style="color:#82AAFF;">.</span></span>
<span class="line"><span style="color:#A6ACCD;">dr-xr-xr-x. 17 root root  224 Nov  3 20:28 ..</span></span>
<span class="line"><span style="color:#A6ACCD;">-rw-------.  1 root root 1273 Nov  3 20:28 anaconda-ks.cfg</span></span>
<span class="line"><span style="color:#A6ACCD;">-rw-------.  1 root root  246 Nov  4 11:41 .bash_history</span></span>
<span class="line"><span style="color:#A6ACCD;">-rw-r--r--.  1 root root   18 Dec 28  2013 .bash_logout</span></span>
<span class="line"><span style="color:#A6ACCD;">-rw-r--r--.  1 root root  176 Dec 28  2013 .bash_profile</span></span>
<span class="line"><span style="color:#A6ACCD;">-rw-r--r--.  1 root root  176 Dec 28  2013 .bashrc</span></span>
<span class="line"><span style="color:#A6ACCD;">-rw-r--r--.  1 root root  100 Dec 28  2013 .cshrc</span></span>
<span class="line"><span style="color:#A6ACCD;">-rw-r--r--.  1 root root  129 Dec 28  2013 .tcshrc</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br></div></div><p>ls最常用的，就是加参数<code>l</code>或者参数<code>a</code>。</p><p>细心的同学，应该会注意到两个特殊的目录。<code>.</code>和<code>..</code>。前者表示的是当前目录，而后者表示的是上层目录。</p><p>使用<code>cd</code>命令，将在这些目录中，自由穿梭。</p><blockquote><p>小技巧：如果你对英文日期阅读困难，可以使用<code>ls -al --full-time</code>查看可读的日期。</p></blockquote><h2 id="_3-cd-切换目录" tabindex="-1"><a href="http://3.cd" target="_blank" rel="noopener noreferrer">3.cd</a> 切换目录 <a class="header-anchor" href="#_3-cd-切换目录" aria-hidden="true">#</a></h2><blockquote><p>cd:Change Directory 切换路径</p></blockquote><p>执行cd命令，可以将工作目录切换到目标文件夹。为了展示cd命令的效果。请在root用户下，执行下面的命令，这将创建一个7层的目录。</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#82AAFF;">cd</span></span>
<span class="line"><span style="color:#A6ACCD;">mkdir -p a1/b2/c3/d4/e5/f6/{g7,g8,g9,g10}</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p>我们使用cd命令，切换到最后一层。然后，我们使用<code>..</code>切换到上层目录。</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># cd a1/b2/c3/d4/e5/f6/g7</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost g7</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># pwd</span></span>
<span class="line"><span style="color:#A6ACCD;">/root/a1/b2/c3/d4/e5/f6/g7</span></span>
<span class="line"></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost g7</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># cd ..</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost f6</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># pwd</span></span>
<span class="line"><span style="color:#A6ACCD;">/root/a1/b2/c3/d4/e5/f6</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br></div></div><p>所以，切换到上面n层目录，只需使用多层级的<code>../</code>即可。有几个特殊的变量，需要说明一下。</p><ul><li><code>../</code> 指的是上层目录</li><li><code>../../</code> 指的是上两层目录</li><li><code>./</code> 指的是当前目录</li><li><code>~</code> 指的是当前的用户目录，这是一个缩写符号</li><li><code>-</code> 使用它，可以在最近两次的目录中来回切换</li></ul><p>我们来使用命令把上面这些特殊变量验证一下。</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#676E95;font-style:italic;"># 跳转到用户根目录</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost tmp</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># cd ~</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># pwd</span></span>
<span class="line"><span style="color:#A6ACCD;">/root</span></span>
<span class="line"></span>
<span class="line"><span style="color:#676E95;font-style:italic;"># 进入到第三层目录</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># cd a1/b2/c3/</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost c3</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># pwd</span></span>
<span class="line"><span style="color:#A6ACCD;">/root/a1/b2/c3</span></span>
<span class="line"></span>
<span class="line"><span style="color:#676E95;font-style:italic;"># 跳回到前三层目录</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost c3</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># cd ../../..</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># pwd</span></span>
<span class="line"><span style="color:#A6ACCD;">/root</span></span>
<span class="line"></span>
<span class="line"><span style="color:#676E95;font-style:italic;"># 跳到上次访问的目录</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># cd -</span></span>
<span class="line"><span style="color:#A6ACCD;">/root/a1/b2/c3</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost c3</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># pwd</span></span>
<span class="line"><span style="color:#A6ACCD;">/root/a1/b2/c3</span></span>
<span class="line"></span>
<span class="line"><span style="color:#676E95;font-style:italic;"># 进入当前目录：等于什么都没干</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost c3</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># cd ./</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost c3</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># pwd</span></span>
<span class="line"><span style="color:#A6ACCD;">/root/a1/b2/c3</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br></div></div><h2 id="_4-mkdir-创建一个新的目录" tabindex="-1">4.mkdir 创建一个新的目录 <a class="header-anchor" href="#_4-mkdir-创建一个新的目录" aria-hidden="true">#</a></h2><blockquote><p>mkdir:Make directory 建立目录</p></blockquote><p>语法：</p><div class="language-"><pre><code>mkdir [-mp] 目录名称
</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>选项与参数：</p><ul><li>-m ：配置文件的权限喔！直接配置，不需要看默认权限 (umask) 的脸色～</li><li>-p ：帮助你直接将所需要的目录(包含上一级目录)递归创建起来！</li></ul><p>实例：请到/tmp底下尝试创建数个新目录看看：</p><div class="language-"><pre><code>[root@www ~]# cd /tmp
[root@www tmp]# mkdir test    &lt;==创建一名为 test 的新目录
[root@www tmp]# mkdir test1/test2/test3/test4
mkdir: cannot create directory `test1/test2/test3/test4&#39;: 
No such file or directory       &lt;== 没办法直接创建此目录啊！
[root@www tmp]# mkdir -p test1/test2/test3/test4
</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><p>加了这个 -p 的选项，可以自行帮你创建多层目录！</p><p>实例：创建权限为 <strong>rwx--x--x</strong> 的目录。</p><div class="language-"><pre><code>[root@www tmp]# mkdir -m 711 test2
[root@www tmp]# ls -l
drwxr-xr-x  3 root  root 4096 Jul 18 12:50 test
drwxr-xr-x  3 root  root 4096 Jul 18 12:53 test1
drwx--x--x  2 root  root 4096 Jul 18 12:54 test2
</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><p>上面的权限部分，如果没有加上 -m 来强制配置属性，系统会使用默认属性。</p><p>如果我们使用 -m ，如上例我们给予 -m 711 来给予新的目录 drwx--x--x 的权限。</p><h2 id="_5-rmdir-删除空的目录" tabindex="-1">5.rmdir 删除空的目录 <a class="header-anchor" href="#_5-rmdir-删除空的目录" aria-hidden="true">#</a></h2><blockquote><p>rmdir:Remove directory 移除目录</p></blockquote><p>语法：</p><div class="language-"><pre><code> rmdir [-p] 目录名称
</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>选项与参数：</p><ul><li>**-p ：**从该目录起，一次删除多级空目录</li></ul><p>删除 runoob 目录</p><div class="language-"><pre><code>[root@www tmp]# rmdir runoob/
</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>将 mkdir 实例中创建的目录(/tmp 底下)删除掉！</p><div class="language-"><pre><code>[root@www tmp]# ls -l   &lt;==看看有多少目录存在？
drwxr-xr-x  3 root  root 4096 Jul 18 12:50 test
drwxr-xr-x  3 root  root 4096 Jul 18 12:53 test1
drwx--x--x  2 root  root 4096 Jul 18 12:54 test2
[root@www tmp]# rmdir test   &lt;==可直接删除掉，没问题
[root@www tmp]# rmdir test1  &lt;==因为尚有内容，所以无法删除！
rmdir: `test1&#39;: Directory not empty
[root@www tmp]# rmdir -p test1/test2/test3/test4
[root@www tmp]# ls -l        &lt;==您看看，底下的输出中test与test1不见了！
drwx--x--x  2 root  root 4096 Jul 18 12:54 test2
</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br></div></div><p>利用 -p 这个选项，立刻就可以将 test1/test2/test3/test4 一次删除。</p><blockquote><p>删除完test4发现test3是空目录继续删除，以此类推。</p></blockquote><p>不过要注意的是，这个 rmdir 仅能删除空的目录，你可以使用 rm 命令来删除非空目录。</p><h2 id="_6-touch-创建空文件" tabindex="-1">6.touch 创建空文件 <a class="header-anchor" href="#_6-touch-创建空文件" aria-hidden="true">#</a></h2><p>1）基本语法</p><p>touch 文件名称</p><p>2）案例实操</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@hadoop101 </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># touch xiyou/dssz/sunwukong.txt</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="_7-cp-复制文件或目录" tabindex="-1">7.cp 复制文件或目录 <a class="header-anchor" href="#_7-cp-复制文件或目录" aria-hidden="true">#</a></h2><p>cp 即拷贝文件和目录。</p><p>语法:</p><div class="language-"><pre><code>[root@www ~]# cp [-adfilprsu] 来源档(source) 目标档(destination)
[root@www ~]# cp [options] source1 source2 source3 .... directory
</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p>选项与参数：</p><ul><li>**-i：**若目标档(destination)已经存在时，在覆盖时会先询问动作的进行(常用)</li><li>**-p：**连同文件的属性一起复制过去，而非使用默认属性(备份常用)；</li><li>**-r：**递归持续复制，用於目录的复制行为；(常用)</li><li>**-f：**为强制(force)的意思，若目标文件已经存在且无法开启，则移除后再尝试一次；</li></ul><p>用 root 身份，将 root 目录下的 .bashrc 复制到 /tmp 下，并命名为 bashrc</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># cp ~/.bashrc /tmp/bashrc</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># cp -i ~/.bashrc /tmp/bashrc</span></span>
<span class="line"><span style="color:#A6ACCD;">cp: overwrite </span><span style="color:#89DDFF;">`</span><span style="color:#C3E88D;">/tmp/bashrc</span><span style="color:#89DDFF;">&#39;</span><span style="color:#C3E88D;">? n  &lt;==n不覆盖，y为覆盖</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><h2 id="_8-rm-删除文件或目录" tabindex="-1">8.rm 删除文件或目录 <a class="header-anchor" href="#_8-rm-删除文件或目录" aria-hidden="true">#</a></h2><p>rm 是强大的删除命令，它可以永久性地删除文件系统中指定的文件或目录。在使用 rm 命令删除文件或目录时，系统不会产生任何提示信息。</p><p>语法：</p><div class="language-"><pre><code> rm [-fir] 文件或目录
</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>选项与参数：</p><ul><li>-f ：就是 force 的意思，忽略不存在的文件，不会出现警告信息；</li><li>-i ：互动模式，在删除前会询问使用者是否动作</li><li>-r ：递归删除啊！最常用在目录的删除了！这是非常危险的选项！！！</li></ul><p>注意，rm 命令是一个具有破坏性的命令，因为 rm 命令会永久性地删除文件或目录，这就意味着，如果没有对文件或目录进行备份，一旦使用 rm 命令将其删除，将无法恢复，因此，尤其在使用 rm 命令删除目录时，要慎之又慎。</p><p>【例 1】基本用法。 rm 命令如果任何选项都不加，则默认执行的是&quot;rm -i 文件名&quot;，也就是在删除一个文件之前会先询问是否删除。例如：</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># touch cangls</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># rm cangls</span></span>
<span class="line"><span style="color:#A6ACCD;">rm:是否删除普通空文件</span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">cangls</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">?</span><span style="color:#A6ACCD;">y</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;">#删除前会询问是否删除</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p>【例 2】 删除目录。 如果需要删除目录，则需要使用&quot;-r&quot;选项。例如:</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># mkdir -p /test/lm/movie/jp</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;">#递归建立测试目录</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># rm /test</span></span>
<span class="line"><span style="color:#A6ACCD;">rm:无法删除</span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">/test/</span><span style="color:#89DDFF;">&quot;</span><span style="color:#A6ACCD;">: 是一个目录</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;">#如果不加&quot;-r&quot;选项，则会报错</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># rm -r /test</span></span>
<span class="line"><span style="color:#A6ACCD;">rm:是否进入目录</span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">/test</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">?</span><span style="color:#A6ACCD;">y</span></span>
<span class="line"><span style="color:#A6ACCD;">rm:是否进入目录</span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">/test/lm/movie</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">?</span><span style="color:#A6ACCD;">y</span></span>
<span class="line"><span style="color:#A6ACCD;">rm:是否删除目录</span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">/test/lm/movie/jp</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">?</span><span style="color:#A6ACCD;">y</span></span>
<span class="line"><span style="color:#A6ACCD;">rm:是否删除目录</span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">/test/lm/movie</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">?</span><span style="color:#A6ACCD;">y</span></span>
<span class="line"><span style="color:#A6ACCD;">rm:是否删除目录</span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">/test/lm</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">?</span><span style="color:#A6ACCD;">y</span></span>
<span class="line"><span style="color:#A6ACCD;">rm:是否删除目录</span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">/test</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">?</span><span style="color:#A6ACCD;">y</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;">#会分别询问是否进入子目录、是否删除子目录</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br></div></div><p>大家会发现，如果每级目录和每个文件都需要确认，那么在实际使用中简直是灾难！</p><p>【例 3】强制删除。 如果要删除的目录中有 1 万个子目录或子文件，那么普通的 rm 删除最少需要确认 1 万次。所以，在真正删除文件的时候，我们会选择强制删除。例如：</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># mkdir -p /test/lm/movie/jp</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;">#重新建立测试目录</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># rm -rf /test</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;">#强制删除，一了百了</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p>加入了强制功能之后，删除就会变得很简单，但是需要注意，数据强制删除之后无法恢复，除非依赖第三方的数据恢复工具，如 extundelete 等。但要注意，数据恢复很难恢复完整的数据，一般能恢复 70%~80% 就很难得了。所以，与其把宝压在数据恢复上，不如养成良好的操作习惯。</p><p>虽然 &quot;-rf&quot; 选项是用来删除目录的，但是删除文件也不会报错。所以，为了使用方便，一般不论是删除文件还是删除目录，都会直接使用 &quot;-rf&quot; 选项。</p><h2 id="_9-mv-移动文件与目录或重命名" tabindex="-1"><a href="http://9.mv" target="_blank" rel="noopener noreferrer">9.mv</a> 移动文件与目录或重命名 <a class="header-anchor" href="#_9-mv-移动文件与目录或重命名" aria-hidden="true">#</a></h2><p>语法：</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># mv [-fiu] source destination</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># mv [options] source1 source2 source3 .... directory</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p>选项与参数：</p><ul><li>-f ：force 强制的意思，如果目标文件已经存在，不会询问而直接覆盖；</li><li>-i ：若目标文件 (destination) 已经存在时，就会询问是否覆盖！</li><li>-u ：若目标文件已经存在，且 source 比较新，才会升级 (update)</li></ul><p>复制一文件，创建一目录，将文件移动到目录中</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># cd /tmp</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www tmp</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># cp ~/.bashrc bashrc</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www tmp</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># mkdir mvtest</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www tmp</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># mv bashrc mvtest</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p>将某个文件移动到某个目录去，就是这样做！</p><p>将刚刚的目录名称更名为 mvtest2</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www tmp</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># mv mvtest mvtest2</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="_10-cat-查看文件内容" tabindex="-1">10.cat 查看文件内容 <a class="header-anchor" href="#_10-cat-查看文件内容" aria-hidden="true">#</a></h2><p>为了查看文件的生成效果，可以使用cat命令检测。cat命令将会把文件的内容，输出打印到终端上。如果加上参数<code>n</code>，甚至可以打印行号。效果如下：</p><div class="language-csharp line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#FFCB6B;">root@localhost</span><span style="color:#A6ACCD;"> ~</span><span style="color:#89DDFF;">]</span><span style="color:#A6ACCD;"># cat spring</span></span>
<span class="line"><span style="color:#F78C6C;">10</span></span>
<span class="line"><span style="color:#F78C6C;">11</span></span>
<span class="line"><span style="color:#F78C6C;">12</span></span>
<span class="line"><span style="color:#F78C6C;">13</span></span>
<span class="line"><span style="color:#F78C6C;">14</span></span>
<span class="line"><span style="color:#F78C6C;">15</span></span>
<span class="line"><span style="color:#F78C6C;">16</span></span>
<span class="line"><span style="color:#F78C6C;">17</span></span>
<span class="line"><span style="color:#F78C6C;">18</span></span>
<span class="line"><span style="color:#F78C6C;">19</span></span>
<span class="line"><span style="color:#F78C6C;">20</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#FFCB6B;">root@localhost</span><span style="color:#A6ACCD;"> ~</span><span style="color:#89DDFF;">]</span><span style="color:#A6ACCD;"># cat </span><span style="color:#89DDFF;">-</span><span style="color:#A6ACCD;">n spring</span></span>
<span class="line"><span style="color:#F78C6C;">1</span><span style="color:#A6ACCD;">	</span><span style="color:#F78C6C;">10</span></span>
<span class="line"><span style="color:#F78C6C;">2</span><span style="color:#A6ACCD;">	</span><span style="color:#F78C6C;">11</span></span>
<span class="line"><span style="color:#F78C6C;">3</span><span style="color:#A6ACCD;">	</span><span style="color:#F78C6C;">12</span></span>
<span class="line"><span style="color:#F78C6C;">4</span><span style="color:#A6ACCD;">	</span><span style="color:#F78C6C;">13</span></span>
<span class="line"><span style="color:#F78C6C;">5</span><span style="color:#A6ACCD;">	</span><span style="color:#F78C6C;">14</span></span>
<span class="line"><span style="color:#F78C6C;">6</span><span style="color:#A6ACCD;">	</span><span style="color:#F78C6C;">15</span></span>
<span class="line"><span style="color:#F78C6C;">7</span><span style="color:#A6ACCD;">	</span><span style="color:#F78C6C;">16</span></span>
<span class="line"><span style="color:#F78C6C;">8</span><span style="color:#A6ACCD;">	</span><span style="color:#F78C6C;">17</span></span>
<span class="line"><span style="color:#F78C6C;">9</span><span style="color:#A6ACCD;">	</span><span style="color:#F78C6C;">18</span></span>
<span class="line"><span style="color:#F78C6C;">10</span><span style="color:#A6ACCD;">	</span><span style="color:#F78C6C;">19</span></span>
<span class="line"><span style="color:#F78C6C;">11</span><span style="color:#A6ACCD;">	</span><span style="color:#F78C6C;">20</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br></div></div><p>除了查看文件内容，cat命令通常用在更多的地方。只有和其他命令联合起来，它才会觉得生活有意义。</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#676E95;font-style:italic;"># 合并a文件和b文件到c文件</span></span>
<span class="line"><span style="color:#A6ACCD;">cat a  b</span><span style="color:#89DDFF;">&gt;&gt;</span><span style="color:#A6ACCD;"> c</span></span>
<span class="line"></span>
<span class="line"><span style="color:#676E95;font-style:italic;"># 把a文件的内容作为输入，使用管道处理。我们在后面介绍</span></span>
<span class="line"><span style="color:#A6ACCD;">cat a </span><span style="color:#89DDFF;">|</span><span style="color:#A6ACCD;"> cmd</span></span>
<span class="line"></span>
<span class="line"><span style="color:#676E95;font-style:italic;"># 写入内容到指定文件。在shell脚本中非常常用。我们在后面会多次用到这种写法</span></span>
<span class="line"><span style="color:#A6ACCD;">cat </span><span style="color:#89DDFF;">&gt;</span><span style="color:#A6ACCD;"> index.html </span><span style="color:#89DDFF;">&lt;&lt;</span><span style="color:#89DDFF;font-style:italic;">EOF</span></span>
<span class="line"><span style="color:#C3E88D;">&lt;html&gt;</span></span>
<span class="line"><span style="color:#C3E88D;">    &lt;head&gt;&lt;title&gt;&lt;/title&gt;&lt;/head&gt;</span></span>
<span class="line"><span style="color:#C3E88D;">    &lt;body&gt;&lt;/body&gt;</span></span>
<span class="line"><span style="color:#C3E88D;">&lt;/html&gt;</span></span>
<span class="line"><span style="color:#89DDFF;font-style:italic;">EOF</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br></div></div><p>由于我们的文件不大，cat命令没有什么危害。但假如文件有几个<code>GB</code>，使用cat就危险的多，这只叫做<code>猫</code>的小命令，会在终端上疯狂的进行输出，你可以通过多次按<code>ctrl+c</code>来终止它。</p><h2 id="_11-less-分屏显示文件内容" tabindex="-1">11.less 分屏显示文件内容 <a class="header-anchor" href="#_11-less-分屏显示文件内容" aria-hidden="true">#</a></h2><p>既然cat命令不适合操作大文件，那一定有替换的方案。less和more就是。由于less的加载速度比more快一些，所以现在一般都使用<code>less</code>。它最主要的用途，是用来分页浏览文件内容，并提供一些快速查找的方式。less是一个<code>交互式</code>的命令，你需要使用一些快捷键来控制它。</p><p>不仅如此，为了方面用户浏览文本内容，less 命令还提供了以下几个功能：</p><ul><li>使用光标键可以在文本文件中前后（左后）滚屏；</li><li>用行号或百分比作为书签浏览文件；</li><li>提供更加友好的检索、高亮显示等操作；</li><li>兼容常用的字处理程序（如 Vim、Emacs）的键盘操作；</li><li>阅读到文件结束时，less 命令不会退出；</li><li>屏幕底部的信息提示更容易控制使用，而且提供了更多的信息。</li></ul><p>less 命令的基本格式如下：</p><p><code>[root@localhost ~]# less [选项] 文件名</code></p><p>此命令可用的选项以及各自的含义如表所示。</p><table><thead><tr><th>选项</th><th>选项含义</th></tr></thead><tbody><tr><td>-N</td><td>显示每行的行号。</td></tr><tr><td>-S</td><td>行过长时将超出部分舍弃。</td></tr><tr><td>-e</td><td>当文件显示结束后，自动离开。</td></tr><tr><td>-g</td><td>只标志最后搜索到的关键同。</td></tr><tr><td>-Q</td><td>不使用警告音。</td></tr><tr><td>-i</td><td>忽略搜索时的大小写。</td></tr><tr><td>-m</td><td>显示类似 more 命令的百分比。</td></tr><tr><td>-f</td><td>强迫打开特殊文件，比如外围设备代号、目录和二进制文件。</td></tr><tr><td>-s</td><td>显示连续空行为一行。</td></tr><tr><td>-b &lt;缓冲区大小&gt;</td><td>设置缓冲区的大小。</td></tr><tr><td>-o &lt;文件名&gt;</td><td>将 less 输出的内容保存到指定文件中。</td></tr><tr><td>-x &lt;数字&gt;</td><td>将【Tab】键显示为规定的数字空格。</td></tr></tbody></table><p>在使用 less 命令查看文件内容的过程中，和 more 命令一样，也会进入交互界面，因此需要读者掌握一些常用的交互指令，如表所示。</p><ul><li><code>空格</code> 向下滚屏翻页</li><li><code>b</code> 向上滚屏翻页</li><li><code>/</code> 进入查找模式，比如<code>/1111</code>将查找1111字样</li><li><code>q</code> 退出less</li><li><code>g</code> 到开头</li><li><code>G</code> 去结尾</li><li><code>j</code> 向下滚动</li><li><code>k</code> 向上滚动，这两个按键和vim的作用非常像</li></ul><p>【例 1】使用 less 命令查看 /boot/grub/grub.cfg 文件中的内容。</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># less /boot/grub/grub.cfg</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;">#</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;">#DO NOT EDIT THIS FILE</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;">#</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;">#It is automatically generated by grub-mkconfig using templates from /etc/grub.d and settings from /etc/default/grub</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;">#</span></span>
<span class="line"></span>
<span class="line"><span style="color:#676E95;font-style:italic;">### BEGIN /etc/grub.d/00_header ###</span></span>
<span class="line"><span style="color:#89DDFF;font-style:italic;">if</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">-s</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">$</span><span style="color:#A6ACCD;">prefix/grubenv </span><span style="color:#89DDFF;">];</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;font-style:italic;">then</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#82AAFF;">set</span><span style="color:#A6ACCD;"> have_grubenv=true</span></span>
<span class="line"><span style="color:#A6ACCD;"> load_env</span></span>
<span class="line"><span style="color:#89DDFF;font-style:italic;">fi</span></span>
<span class="line"><span style="color:#82AAFF;">set</span><span style="color:#A6ACCD;"> default=</span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">0</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#89DDFF;font-style:italic;">if</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">$ {prev_saved_entry}</span><span style="color:#89DDFF;">&quot;</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">];</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;font-style:italic;">then</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#82AAFF;">set</span><span style="color:#A6ACCD;"> saved_entry=</span><span style="color:#89DDFF;">&quot;${</span><span style="color:#A6ACCD;">prev_saved_entry</span><span style="color:#89DDFF;">}&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> save_env saved_entry</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#82AAFF;">set</span><span style="color:#A6ACCD;"> prev_saved_entry= save_env prev_saved_entry</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#82AAFF;">set</span><span style="color:#A6ACCD;"> boot_once=true</span></span>
<span class="line"><span style="color:#89DDFF;font-style:italic;">fi</span></span>
<span class="line"></span>
<span class="line"><span style="color:#C792EA;">function</span><span style="color:#A6ACCD;"> </span><span style="color:#82AAFF;">savedefault</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;font-style:italic;">if</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">-z</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;${</span><span style="color:#A6ACCD;">boot_once</span><span style="color:#89DDFF;">}&quot;</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">];</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;font-style:italic;">then</span></span>
<span class="line"><span style="color:#82AAFF;">:</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br></div></div><p>可以看到，less 在屏幕底部显示一个冒号（：），等待用户输入命令，比如说，用户想向下翻一页，可以按空格键；如果想向上翻一页，可以按 b 键。</p><h2 id="_12-echo-输出内容到控制台" tabindex="-1">12.echo 输出内容到控制台 <a class="header-anchor" href="#_12-echo-输出内容到控制台" aria-hidden="true">#</a></h2><p>echo 输出内容到控制台</p><p><strong>基本语法</strong></p><p>echo [选项] [输出内容]</p><p><strong>选项：</strong></p><ul><li>-e： 支持反斜线控制的字符转换</li></ul><table><thead><tr><th>控制字符</th><th>作用</th></tr></thead><tbody><tr><td>\</td><td>输出\本身</td></tr><tr><td>\n</td><td>换行符</td></tr><tr><td>\t</td><td>制表符，也就是 Tab</td></tr></tbody></table><p><strong>案例实操</strong></p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">atguigu@hadoop101 </span><span style="color:#89DDFF;">~]</span><span style="color:#A6ACCD;">$ </span><span style="color:#82AAFF;">echo</span><span style="color:#A6ACCD;"> “hello\tworld”</span></span>
<span class="line"><span style="color:#A6ACCD;">hello\tworld</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">atguigu@hadoop101 </span><span style="color:#89DDFF;">~]</span><span style="color:#A6ACCD;">$ </span><span style="color:#82AAFF;">echo</span><span style="color:#A6ACCD;"> -e “hello\tworld”</span></span>
<span class="line"><span style="color:#A6ACCD;">hello world</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><h2 id="_13-head-显示文件头部内容" tabindex="-1">13.head 显示文件头部内容 <a class="header-anchor" href="#_13-head-显示文件头部内容" aria-hidden="true">#</a></h2><p>取出文件前面几行</p><p>语法：</p><div class="language-"><pre><code>head [-n number] 文件 
</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>选项与参数：</p><ul><li>-n ：后面接数字，代表显示几行的意思</li></ul><div class="language-"><pre><code>[root@www ~]# head /etc/man.config
</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>默认的情况中，显示前面 10 行！若要显示前 20 行，就得要这样：</p><div class="language-"><pre><code>[root@www ~]# head -n 20 /etc/man.config
</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="_14-tail-输出文件尾部内容" tabindex="-1">14.tail 输出文件尾部内容 <a class="header-anchor" href="#_14-tail-输出文件尾部内容" aria-hidden="true">#</a></h2><p>取出文件后面几行</p><p>语法：</p><div class="language-"><pre><code>tail [-n number] 文件 
</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>选项与参数：</p><ul><li>-n ：后面接数字，代表显示几行的意思</li><li>-f ：表示持续侦测后面所接的档名，要等到按下[ctrl]-c才会结束tail的侦测</li></ul><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># tail /etc/man.config</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;"># 默认的情况中，显示最后的十行！若要显示最后的 20 行，就得要这样：</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@www </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># tail -n 20 /etc/man.config</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><p>对于部分程序员来说，<code>tail -f</code>或许是最常用的命令之一。它可以在控制终端，实时监控文件的变化，来看一些滚动日志。比如查看nginx或者tomcat日志等等。</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#676E95;font-style:italic;"># 滚动查看系统日志</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;">#tail -f anaconda-ks.cfg</span></span>
<span class="line"><span style="color:#A6ACCD;">@server-platform</span></span>
<span class="line"><span style="color:#A6ACCD;">@server-policy</span></span>
<span class="line"><span style="color:#A6ACCD;">pax</span></span>
<span class="line"><span style="color:#A6ACCD;">oddjob</span></span>
<span class="line"><span style="color:#A6ACCD;">sgpio</span></span>
<span class="line"><span style="color:#A6ACCD;">certmonger</span></span>
<span class="line"><span style="color:#A6ACCD;">pam_krb5</span></span>
<span class="line"><span style="color:#A6ACCD;">krb5-workstation</span></span>
<span class="line"><span style="color:#A6ACCD;">perl-DBD-SQLite</span></span>
<span class="line"><span style="color:#A6ACCD;">%end</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;">#光标不会退出文件，而会一直监听在文件的结尾处</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br></div></div><p>这条命令会显示文件的最后 10 行内容，而且光标不会退出命令，每隔一秒会检查一下文件是否增加新的内容，如果增加就追加到原来的输出结果后面并显示。因此，这时如果向文件中追加一些数据（需要开启一个新终端）：</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># echo 2222222222 &gt;&gt; anaconda-ks.cfg</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># echo 3333333333 &gt;&gt; anaconda-ks.cfg</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;">#在新终端中通过echo命令向文件中追加数据</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><p>那么，在原始的正在监听的终端中，会看到如下信息：</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># tail -f anaconda-ks.cfg @server-platforin</span></span>
<span class="line"><span style="color:#A6ACCD;">@server-policy</span></span>
<span class="line"><span style="color:#A6ACCD;">pax</span></span>
<span class="line"><span style="color:#A6ACCD;">oddjob</span></span>
<span class="line"><span style="color:#A6ACCD;">sgpio</span></span>
<span class="line"><span style="color:#A6ACCD;">certmonger</span></span>
<span class="line"><span style="color:#A6ACCD;">pam_krb5</span></span>
<span class="line"><span style="color:#A6ACCD;">krb5-workstation</span></span>
<span class="line"><span style="color:#A6ACCD;">perl-DBD-SQLite</span></span>
<span class="line"><span style="color:#A6ACCD;">%end</span></span>
<span class="line"><span style="color:#A6ACCD;">2222222222</span></span>
<span class="line"><span style="color:#A6ACCD;">33333333333</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;">#在文件的结尾处监听到了新増数据</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br></div></div><p>如果想终止输出，按【Ctrl+c】键中断 tail 命令即可。</p><p>通常情况下，日志滚动的过快，依然会造成一些困扰，需要配合grep命令达到过滤效果。</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#676E95;font-style:italic;"># 滚动查看包含info字样的日志信息</span></span>
<span class="line"><span style="color:#A6ACCD;">tail -f /var/log/messages </span><span style="color:#89DDFF;">|</span><span style="color:#A6ACCD;"> grep info</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><blockquote><p>对于tail命令来说，还有一个大写的参数<code>F</code>。这个参数，能够监控到重新创建的文件。比如像一些log4j等日志是按天滚动的，<code>tail -f</code>无法监控到这种变化。</p></blockquote><h2 id="_15-输出重定向和-追加" tabindex="-1">15.&gt; 输出重定向和 &gt;&gt; 追加 <a class="header-anchor" href="#_15-输出重定向和-追加" aria-hidden="true">#</a></h2><p><strong>1）基本语法</strong></p><p>（1）ls -l &gt; 文件 （功能描述：列表的内容写入文件 a.txt 中（覆盖写））</p><p>（2）ls -al &gt;&gt; 文件 （功能描述：列表的内容追加到文件 aa.txt 的末尾）</p><p>（3）cat 文件 1 &gt; 文件 2 （功能描述：将文件 1 的内容覆盖到文件 2） cat 文件1 文件2 &gt; 文件3（功能描述：将文件1 和 2的内容合并后输出到文件3中。）</p><p>（4）echo “内容” &gt;&gt; 文件</p><p><strong>2）案例实操</strong></p><p>（1）将 ls 查看信息写入到文件中</p><p><code>[root@hadoop101 ~]# ls -l&gt;houge.txt</code></p><p>（2）将 ls 查看信息追加到文件中</p><p><code>[root@hadoop101 ~]# ls -l&gt;&gt;houge.txt </code></p><p>（3）采用 echo 将 hello 单词追加到文件中</p><p><code>[root@hadoop101 ~]# echo hello&gt;&gt;houge.txt</code></p><p>（4）将文件 file1.txt 和 file2.txt 的内容合并后输出到文件 file3.txt 中。</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost base</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># ls</span></span>
<span class="line"><span style="color:#A6ACCD;">file1.txt    file2.txt</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost base</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># cat file1.txt</span></span>
<span class="line"><span style="color:#A6ACCD;">ds</span><span style="color:#89DDFF;">(</span><span style="color:#A6ACCD;">file1.txt</span><span style="color:#89DDFF;">)</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost base</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># cat file2.txt</span></span>
<span class="line"><span style="color:#A6ACCD;">is great</span><span style="color:#89DDFF;">(</span><span style="color:#A6ACCD;">file2.txt</span><span style="color:#89DDFF;">)</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost base</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># cat file1.txt file2.txt &gt; file3.txt</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost base</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># more file3.txt</span></span>
<span class="line"><span style="color:#676E95;font-style:italic;">#more 命令可查看文件中的内容</span></span>
<span class="line"><span style="color:#A6ACCD;">ds</span><span style="color:#89DDFF;">(</span><span style="color:#A6ACCD;">file1.txt</span><span style="color:#89DDFF;">)</span></span>
<span class="line"><span style="color:#A6ACCD;">is great</span><span style="color:#89DDFF;">(</span><span style="color:#A6ACCD;">file2.txt</span><span style="color:#89DDFF;">)</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@localhost base</span><span style="color:#89DDFF;">]</span><span style="color:#676E95;font-style:italic;"># ls</span></span>
<span class="line"><span style="color:#A6ACCD;">file1.txt    file2.txt    file3.txt</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br></div></div><h2 id="_16-history-查看已经执行过历史命令" tabindex="-1">16.history 查看已经执行过历史命令 <a class="header-anchor" href="#_16-history-查看已经执行过历史命令" aria-hidden="true">#</a></h2><p><strong>1）基本语法</strong></p><p>history （功能描述：查看已经执行过历史命令）</p><p><strong>2）案例实操</strong></p><p>（1）查看已经执行过的历史命令</p><p><code>[root@hadoop101 test1]# history</code></p><p>（2）显示最近3条命令历史</p><p><code>histroy 3</code></p><p>（3）清除历史记录</p><p><code>history -c</code></p><h2 id="_17-ln软链接" tabindex="-1">17.ln软链接 <a class="header-anchor" href="#_17-ln软链接" aria-hidden="true">#</a></h2><p>软链接也称为符号链接，类似于 windows 里的快捷方式，有自己的数据块，主要存放 了链接其他文件的路径。</p><p>1）基本语法</p><p><code> ln -s [原文件或目录] [软链接名] </code>（功能描述：给原文件创建一个软链接）</p><p>2）经验技巧</p><p>​ 删除软链接： rm -rf 软链接名，而不是 <code>rm -rf 软链接名/</code></p><p>​ <strong>如果使用 rm -rf 软链接名/ 删除，会把软链接对应的真实目录下内容删掉</strong></p><p>​ 查询：通过 ll 就可以查看，列表属性第 1 位是 l，尾部会有位置指向。</p><p>3）案例实操</p><p>​ （1）创建软连接</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@hadoop101 </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># mv houge.txt xiyou/dssz/</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@hadoop101 </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># ln -s xiyou/dssz/houge.txt ./houzi</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@hadoop101 </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># ll</span></span>
<span class="line"><span style="color:#A6ACCD;">lrwxrwxrwx. 1 root root 20 6 月 17 12:56 houzi -</span><span style="color:#89DDFF;">&gt;</span></span>
<span class="line"><span style="color:#A6ACCD;">xiyou/dssz/houge.txt</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><p>​ （2）删除软连接(注意不要写最后的/)</p><p>​ <code>[root@hadoop101 ~]# rm -rf houzi</code></p><p>​ （3）进入软连接实际物理路径</p><div class="language-bash line-numbers-mode"><pre><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@hadoop101 </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># ln -s xiyou/dssz/ ./dssz</span></span>
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">root@hadoop101 </span><span style="color:#89DDFF;">~]</span><span style="color:#676E95;font-style:italic;"># cd -P dssz/</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><h2 id="_18-总结" tabindex="-1">18.总结 <a class="header-anchor" href="#_18-总结" aria-hidden="true">#</a></h2><h3 id="_18-1-文件剪贴删除复制重名等" tabindex="-1">18.1 文件剪贴删除复制重名等 <a class="header-anchor" href="#_18-1-文件剪贴删除复制重名等" aria-hidden="true">#</a></h3><ul><li>pwd：Print Working Directory，显示当前工作目录的绝对路径。</li><li>ls：-a：显示当前目录所有的文件和目录，包括隐藏的； <ul><li>-l：以列表的方式显示信息。</li></ul></li><li>cd：cd ~：回到自己的家目录；cd …：回到当前目录的上一级目录。</li><li>mkdir：创建目录；-p：创建多级目录。</li><li>rmdir：删除空目录。rmdir不能删除非空的目录。如果需要删除非空的目录，需要使用rm -rf。</li><li>cp：拷贝文件到指定目录； <ul><li>-r：递归复制整个文件夹。强制覆盖不提示的方法：</li><li>cp命令改为\cp</li></ul></li><li>rm：移除文件或目录； <ul><li>-r：递归删除整个文件夹；</li><li>-f：强制删除不提示。</li></ul></li><li>mv：移动文件与目录或重命名，两种功能！</li><li>touch：创建空文件。可以一次性创建多个文件</li><li>ln 给文件创建一个软连接 <ul><li>用法:ln -s [源文件或目录][软连接名]</li></ul></li></ul><h3 id="_18-2-文件查看" tabindex="-1">18.2 文件查看 <a class="header-anchor" href="#_18-2-文件查看" aria-hidden="true">#</a></h3><ul><li>cat：查看文件内容。只能浏览文件，而不能修改文件。 <ul><li>-n：显示行号。</li><li>结尾加上 | more：分页显示，不会全部一下显示完。</li></ul></li><li>more：是一个基于VI编辑器的文本过滤器，它以全屏幕的方式按页显示文本文件的内容。more还内置了很多快捷键： <ul><li>空白键（Space）：向下翻一页</li><li>Enter：向下翻一行</li><li>q：立刻离开more，不再显示该文件内容</li><li>Ctrl + F：向下滚动一屏</li><li>Ctrl + B：返回上一屏</li><li>= :输出当前行的行号</li><li>:f 输出文件名和当前行的行号</li></ul></li><li>less：用来分屏查看文件内容，与more相似，但是更强大，支持各种显示终端。less指令在显示文件内容时，并不是一次将整个文件加载之后才显示，而是根据显示需要加载内容。对于显示大型文件具有较高的效率。</li><li>head：显示文件的开头部分。-n 5：看前面5行内容。</li><li>tail：输出文件中尾部的内容。 <ul><li>-n 5：看后面5行内容。</li><li>-f：时事追踪该文档的所有更新</li></ul></li><li>&gt;指令：输出重定向。如果不存在会创建文件，否则会将原来的文件内容覆盖。</li><li>&gt;&gt;指令：追加。如果不存在会创建文件，否则不会覆盖原来的文件内容，而是追加到文件的尾部。</li><li>echo：输出内容到控制台。</li><li>history：查看历史指令</li></ul></div></div><!----></main><!--[--><!--]--><!----></div></div></div></div><div class="visually-hidden" aria-live="polite" data-v-23306c50>05【实操篇-文件目录类命令】 has loaded</div></div></div>
    <script>__VP_HASH_MAP__ = JSON.parse("{\"about_canshu.md\":\"5cbc0865\",\"about_chahuo.md\":\"4437b8d9\",\"about_dayin.md\":\"34b5b775\",\"ajax_01.md\":\"2bc3ac36\",\"ajax_02.md\":\"2b66aa43\",\"echarts_01.md\":\"8784be9b\",\"echarts_02.md\":\"3e6ecdea\",\"echarts_03.md\":\"28ca81f0\",\"echarts_04.md\":\"d02d74fb\",\"echarts_05.md\":\"f150b054\",\"es6_01.md\":\"53b72f76\",\"es6_02.md\":\"1fc3a71b\",\"es6_03.md\":\"2b8d77d0\",\"es6_04.md\":\"19f87206\",\"es6_05.md\":\"78caf034\",\"es6_06.md\":\"f8d3c991\",\"es6_07.md\":\"324f9949\",\"es6_08.md\":\"87411498\",\"es6_09.md\":\"3486bc74\",\"es6_10.md\":\"71a60a12\",\"es6_11.md\":\"6d589e6c\",\"es6_12.md\":\"d82e096b\",\"es6_13.md\":\"78856900\",\"es6_14.md\":\"40c129d1\",\"git_01.md\":\"bf73bb28\",\"git_02.md\":\"650fa8d0\",\"git_03.md\":\"4384f718\",\"git_04.md\":\"14478c6d\",\"index.md\":\"09348a64\",\"jihe_react_index.md\":\"f57878ae\",\"jihe_reactnative_index.md\":\"c7e0faf3\",\"jihe_vue_index.md\":\"990e53d2\",\"jihe_vuerouter_index.md\":\"d28167d1\",\"jihe_vuex_index.md\":\"b9d762ab\",\"js_01.md\":\"48c6f3a8\",\"js_02.md\":\"a5183efb\",\"js_03.md\":\"5a8ce924\",\"js_04.md\":\"3db3e706\",\"js_05.md\":\"7b8951d8\",\"js_06.md\":\"dc3d579a\",\"js_07.md\":\"e7a4eda3\",\"js_08.md\":\"f75c92a3\",\"js_09.md\":\"80e86e46\",\"js_10.md\":\"646ac118\",\"js_11.md\":\"7d754050\",\"js_12.md\":\"7e6eae06\",\"js_13.md\":\"947200bc\",\"js_14.md\":\"1c0566af\",\"js_15.md\":\"d465d165\",\"js_16.md\":\"1c7c9370\",\"js_17.md\":\"71dec812\",\"js_18.md\":\"d68348c2\",\"js_19.md\":\"72c34e28\",\"js_20.md\":\"ff30fdd3\",\"js_21.md\":\"aa9bea2b\",\"js_22.md\":\"6bc45920\",\"js_23.md\":\"3131d6e6\",\"js_24.md\":\"5f12ad69\",\"js_25.md\":\"c5932cf5\",\"js_26.md\":\"b8e719df\",\"js_27.md\":\"6679728d\",\"js_28.md\":\"c9ec23e0\",\"js_29.md\":\"09376a4e\",\"js_30.md\":\"dbc798cb\",\"js_31.md\":\"283dae59\",\"js_32.md\":\"11d6ad8d\",\"js_33.md\":\"e4232cd9\",\"js_34.md\":\"a3b52a45\",\"js_35.md\":\"1477beb5\",\"js_36.md\":\"01702bb7\",\"keshitong_caigou.md\":\"c5f9edad\",\"keshitong_caiwu.md\":\"90dbd259\",\"keshitong_index.md\":\"7522f84e\",\"keshitong_xiaoshou.md\":\"b4d67695\",\"keshitong_xunjia.md\":\"49b056fe\",\"less_01.md\":\"cc6e26b8\",\"linux_01.md\":\"40a56533\",\"linux_02.md\":\"fa080f7e\",\"linux_03.md\":\"9c723c17\",\"linux_04.md\":\"c4b01f09\",\"linux_05.md\":\"cfe63746\",\"linux_06.md\":\"4e05c7c6\",\"linux_07.md\":\"2dbdda0c\",\"linux_08.md\":\"80f78478\",\"linux_09.md\":\"b9157005\",\"linux_10.md\":\"55e60bfe\",\"linux_11.md\":\"3b59a057\",\"mongodb_01.md\":\"4e9aab55\",\"mysql_01.md\":\"66f81032\",\"mysql_02.md\":\"38ff9d8a\",\"mysql_03.md\":\"4a1047e3\",\"mysql_04.md\":\"ed6dc0f6\",\"mysql_05.md\":\"fb50b511\",\"mysql_06.md\":\"4f4b1170\",\"mysql_07.md\":\"3f58b4d2\",\"mysql_08.md\":\"7e23f325\",\"mysql_09.md\":\"bef84df5\",\"mysql_10.md\":\"33e4e499\",\"mysql_11.md\":\"4e732a7d\",\"nodejs_01.md\":\"614d43a3\",\"nodejs_02.md\":\"4899f883\",\"nodejs_03.md\":\"f47d5f16\",\"nodejs_04.md\":\"7755e031\",\"nodejs_05.md\":\"ef947c59\",\"nodejs_06.md\":\"ab0a9b5a\",\"nodejs_07.md\":\"ad0e80be\",\"nodejs_08.md\":\"11027bdf\",\"nodejs_09.md\":\"4e4f9b03\",\"nodejs_10.md\":\"c4453555\",\"nodejs_11.md\":\"9f62715b\",\"nodejs_12.md\":\"1229399a\",\"nodejs_13.md\":\"e490f00c\",\"nodejs_14.md\":\"d756be55\",\"nodejs_15.md\":\"eb622fe8\",\"nodejs_16.md\":\"a5beb6c6\",\"sass_01.md\":\"0d150b1a\",\"sass_02.md\":\"8ee85f45\",\"sass_03.md\":\"7c4069d6\",\"sass_04.md\":\"85602152\",\"sass_05.md\":\"b62c38b1\",\"sass_06.md\":\"d02e3012\",\"sass_07.md\":\"edcc3b93\",\"sass_08.md\":\"9c108ef4\",\"sass_09.md\":\"3bdde859\",\"sass_10.md\":\"7eac5fed\",\"sass_11.md\":\"3d1861cf\",\"tailwindcss_01.md\":\"de90a25d\",\"tailwindcss_02.md\":\"bbfd989e\",\"tailwindcss_03.md\":\"dc351bec\",\"tailwindcss_04.md\":\"27601329\",\"test_index.md\":\"57ee7ee1\",\"test_muban.md\":\"5118e1bd\",\"test_zhongqiu.md\":\"3d9111e0\",\"typescript_01.md\":\"27d9f7e0\",\"typescript_02.md\":\"6cf9cb32\",\"typescript_03.md\":\"a851d1d2\",\"typescript_04.md\":\"954cb0d0\",\"typescript_05.md\":\"989bd8d1\",\"typescript_06.md\":\"2c90dcac\",\"vue2_01.md\":\"fd17f4d6\",\"vue2_02.md\":\"84ab761d\",\"vue2_03.md\":\"a64353d4\",\"vue2_04.md\":\"b9b0b23e\",\"vue2_05.md\":\"81a8a08d\",\"vue2_06.md\":\"2ce32e2a\",\"vue2_07.md\":\"19b50842\",\"vue2_08.md\":\"4c8868f5\",\"vue2_09.md\":\"94977e11\",\"vue2_10.md\":\"8e789ccc\",\"vue2_11.md\":\"ee9e7943\",\"vue2_12.md\":\"5249d4c5\",\"vue2_13.md\":\"048d4471\",\"vue2_14.md\":\"63be0ece\",\"vue2_15.md\":\"bd679101\",\"vue2_16.md\":\"bbe6e777\",\"vue3_01.md\":\"27d0d58b\",\"vue3_02.md\":\"22bcb9e5\",\"vue3_03.md\":\"3c52430b\",\"vue3_04.md\":\"0bb848ba\",\"vue3_06.md\":\"1cc04cca\",\"vue3_07.md\":\"28531efb\",\"vue3_08.md\":\"66ee6b02\",\"vue3_09.md\":\"9ea9285a\",\"vue3_10.md\":\"a1d6a99a\",\"vue3_11.md\":\"cb4aa0f5\",\"vue3_12.md\":\"27e13ddf\",\"vue3_13.md\":\"3976cde5\",\"vue3_14.md\":\"1b2e16e7\",\"vue3_15.md\":\"24dc5c2d\",\"vue3_16.md\":\"5efc1ed6\",\"vue3_17.md\":\"ac67e2ed\",\"yuanshen_index.md\":\"437ce691\"}")</script>
    <script type="module" async src="/assets/app.82d46cfc.js"></script>
    
  </body>
</html>